package com.food.dao.service;

import java.io.InputStream;
import java.util.List;

import com.food.dao.StepDAOJdbc;
import com.food.dao.in.StepDAO;
import com.food.model.Step;

public class StepService {
    private StepDAO dao = new StepDAOJdbc();
    public void insertStep(Step bean){
    	if(bean!=null){
    		dao.insertStep(bean);
    	}
    }
    public void updateStep(Step bean){
    	if(bean!=null){
    		dao.updateStep(bean.getRid(),bean.getSnumber(), bean.getSword(),
    				bean.getSimg(), bean.getSid());
    	}
    }
    public void deleteStep(Step bean){
    	if(bean!=null){
    		dao.deleteStep(bean.getSid());
    	}
    }
    public List<Step> findStepByRecipe(Step bean){
    	return dao.findStepByRecipe(bean.getRid());
    }
}
